package com.xxx.common.sentinel.configure;

import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import com.alibaba.fastjson.JSON;

import java.util.List;

public class SyncToNacosConfig {

    /**
     * 定时器同步 dashboard 的规则去 nacos
     */
    public String test() {
        List<FlowRule> rules = FlowRuleManager.getRules();
        return JSON.toJSONString(rules);
    }


}
